import { defineConfig } from '@soybeanjs/eslint-config';

export default defineConfig(
  { vue: true, unocss: true },
  {
    rules: {
      'vue/multi-word-component-names': [
        'warn',
        {
          ignores: ['index', 'App', 'Register', '[id]', '[url]']
        }
      ],
      'vue/component-name-in-template-casing': [
        'warn',
        'PascalCase',
        {
          registeredComponentsOnly: false,
          ignores: ['/^icon-/']
        }
      ],
      'unocss/order-attributify': 'off',
      'no-param-reassign': 'off', // 禁止给参数重新赋值
      'max-depth': [0, 6], // 最大嵌套深度
      '@typescript-eslint/no-shadow': 'off', // 禁止变量声明与外层作用域的变量同名
      'no-use-before-define': 'off',
      '@typescript-eslint/no-use-before-define': ['error'],
      'no-continue': 'off',
      'accessor-pairs': 0
    }
  }
);
